package bfgca;
import java.awt.*;
import javax.swing.*;

public class ClientGUI {

  private static void createAndShowGUI(){
    JFrame frame = new JFrame("BFGCA");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    
    JMenuBar menuBar = new JMenuBar();
    JMenu fileMenu = new JMenu("File");
    fileMenu.add("Commit Changes");
    menuBar.setOpaque(true);
    menuBar.add(fileMenu);
    menuBar.setPreferredSize(new Dimension(200, 20));
    
    MapComponent map = new MapComponent();
    JScrollPane mapView = new JScrollPane(map);
    
//    JLabel label = new JLabel("System Details");
    SystemDetailComponent sysDet = new SystemDetailComponent();
    
    VesselComponent vessels = new VesselComponent();
    
    JSplitPane mapSplit = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
        mapView, sysDet);
    JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
        mapSplit, vessels);
    frame.setJMenuBar(menuBar);
    frame.getContentPane().add(splitPane);
    
    frame.pack();
    frame.setVisible(true);
  }
  
  public static void main(String[] args){
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
      public void run(){
        createAndShowGUI();
      }
      }
    );
  }
}
